﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.Data.Common;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Manager_Excel : System.Web.UI.Page {
	protected void Page_Load(object sender, EventArgs e) {
		string connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Data\\MyDocs\\AFC\\BayQuest\\TestFiles\\AutoCredit.xls;Extended Properties=    ""Excel 8.0;HDR=YES;""";
		using(OleDbConnection conn = new OleDbConnection(connectionString)){
			using(OleDbCommand comm = new OleDbCommand("SELECT * FROM [Sheet1$]",conn)){
				OleDbDataAdapter da = new OleDbDataAdapter(comm);
				DataSet ds = new DataSet();
				da.Fill(ds);
			}
		}
	}
}
